/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package essai;

import dao.IdaoLocal;
import java.util.List;
import javax.ejb.EJB;
import javax.jws.WebMethod;
import javax.jws.WebService;

/**
 *
 * @author kheirarahali
 */
@WebService(serviceName = "NewWebService")
public class NewWebService {
    @EJB
    private IdaoLocal ejbRef;// Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Web Service Operation")

    @WebMethod(operationName = "getAllAccounts")
    public List<entities.Account> getAllAccounts() {
        return ejbRef.getAllAccounts();
    }

    @WebMethod(operationName = "getAllProducts")
    public List<entities.Product> getAllProducts() {
        return ejbRef.getAllProducts();
    }
    
}
